Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bulk Plugin Management: Avoid CSS leak when navigating to plugin details #99224

Merged
merged 5 commits into from
Feb 6, 2025

Conversation

epeicher
Copy link
Contributor

@epeicher epeicher commented Feb 3, 2025

Resolves https://github.com/Automattic/dotcom-forge/issues/10321

Proposed Changes

  • Adds the /plugins/manage/sites to the SITE_DASHBOARD_ROUTES list to display the Site Dashboard theme
  • Adds the noSite to the /plugins/manage/sites controller to clear the site selection from the state.
  • Use the getSites selector to display all sites, regardless of the site selected in the state, as this view does not have site selection.

Why are these changes being made?

  • To fix the bug

Testing Instructions

  • Apply this patch and navigate to http://calypso.localhost:3000/plugins/manage/sites/:pluginId e.g. http://calypso.localhost:3000/plugins/manage/sites/aino-blocks
  • On the bottom table, find a site where the Go to plugin page action is displayed and click on it
  • Click on the Go Back button in the browser
  • Check you can see the same look and feel as in the previous screen

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
    • For UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

@matticbot
Copy link
Contributor

matticbot commented Feb 3, 2025

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

App Entrypoints (~4 bytes removed 📉 [gzipped])

name         parsed_size           gzip_size
entry-main         +24 B  (+0.0%)       -4 B  (-0.0%)
entry-login        +24 B  (+0.0%)       -4 B  (-0.0%)

Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used.

Sections (~9 bytes removed 📉 [gzipped])

name                             parsed_size           gzip_size
jetpack-cloud-plugin-management        -83 B  (-0.0%)      -12 B  (-0.0%)
a8c-for-agencies-plugins               -83 B  (-0.0%)      -12 B  (-0.0%)
plugins                                -73 B  (-0.0%)       -9 B  (-0.0%)

Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to.

Legend

What is parsed and gzip size?

Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

@matticbot
Copy link
Contributor

matticbot commented Feb 3, 2025

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • notifications
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug fix/bulk-plugin-management-css-leak on your sandbox.

Copy link
Contributor

@gcsecsey gcsecsey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes LGTM and work great :shipit:

CleanShot.2025-02-05.at.16.11.50.mp4

@epeicher epeicher merged commit fab519b into trunk Feb 6, 2025
12 of 13 checks passed
@epeicher epeicher deleted the fix/bulk-plugin-management-css-leak branch February 6, 2025 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants